package Others.SimpleCalculator.entity;

public class CalculateInterfaceFactory {

    public static CalculateInterface getCalculateInterfaceBean(String type) {
        return switch (type) {
            case "+" -> new Plus();
            case "-" -> new Minus();
            case "*" -> new Multiply();
            case "/" -> new Division();
            default -> null;
        };
    }

}
